home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 12511500 / var1292.dms / var1292.adf / ifsgen / ifsgen.doc < prev    next >
Text File  |  1993-03-16  |  36KB  |  769 lines

  1.  
  2.                         IFSGEN v1.0 (c) January 1991
  3.                  
  4.                    Written with AMOS (c) 1990 Mandarin/Jawx
  5.  
  6.                            By Andrew Kreibich
  7.  
  8.    SEE END OF FILE FOR ADDITIONAL DOCS/CHANGES FOR LATER VERSIONS
  9.  
  10.    This file refers to IFSgen and IFSgenDEM. The DEM version is identical
  11.    to the real thing except that all saves have been disabled. You can
  12.    save yourself a lot of time (and your pictures) by registering. See
  13.    DISTRIBUTION, below.
  14.  
  15.  
  16.    Note: To toggle Wbench screen use left-Amiga-A (Alt-N and M will not work)
  17.          To quit without using the quit menu press Ctrl-C.
  18.  
  19.  
  20.  
  21.    #########################
  22.       MEMORY REQUIREMENTS
  23.    #########################
  24.    My machine is an A500 with 1 meg of ram. I forked out a lot of hard earned
  25.    cash for the extra half meg and I intend getting some use out of it!
  26.    Therefore when I write programmes I usually use up plenty of memory in 
  27.    order to get more speed where possible. I have not tried this programme
  28.    on a 512k machine, so I don't know if it would run. It will almost
  29.    certainly not run on a 512k machine if workbench is loaded and may still
  30.    cause some problems when you have generated a lot of triangles or when 
  31.    the programme tries to open the palette tool. 
  32.  
  33.  
  34.    If you have been using it for a while and especially if you have been
  35.    changing from mono to colour and back a lot then you will probably end 
  36.    up with fragmented memory which could result in strange things happening
  37.    or your machine crashing.
  38.    I will try to fix this in version 3 if I get enough response from people
  39.    who are having this problem. (it only happens to me very rarely so I 
  40.    haven't bothered to do anything about it).
  41.  
  42.  
  43.    ################
  44.      DISTRIBUTION
  45.    ################
  46.  
  47.    THIS PROGRAMME IS SHAREWARE!
  48.  
  49.    This means that my wallet would appreciate a little feedback for all my
  50.    efforts!
  51.    You may distribute the DEM version of this software to anyone providing you 
  52.    observe the following conditions.
  53.    YOU MAY NOT DISTRIBUTE THE FULL VERSION OF IFSgen TO ANYONE ELSE WHO HAS 
  54.    NOT REGISTERED WITH ME. (give them the DEM version instead!)
  55.  
  56.    (a) You don't make any money from it (apart from a nominal copying fee)
  57.        without my prior written permission.
  58.  
  59.    (b) You may not include any part of it in any commercial release  
  60.        (including SHAREWARE or one of its variations) without my prior
  61.        written permission. 
  62.  
  63.    (c) You give me credit for any of my routines in your doc. files 
  64.        and/or the programme you use them in. (FEED MY EGO!)
  65.  
  66.    (d) You distribute this entire doc. file with the programme and 
  67.        also the .IFS and .IFF files in the drawer. The only exception to this
  68.        is if it is on a magazine's coverdisk and you need the space. In this
  69.        case you may delete the .IFF files, but NOT the .IFS files, everyone 
  70.        else please leave them alone.
  71.  
  72.    (e) You may use the demonstration version on the coverdisk of a magazine
  73.        providing you include all files with the exception of the .IFF files
  74.        (see (d)).
  75.      
  76.    (f) You write back and let me know what you think of it along with a 
  77.        SHAREWARE donation (min $20 Australian)
  78.  
  79.             To  Andrew Kreibich
  80.                 Box 333
  81.                 Wantirna South
  82.                 Victoria
  83.                 Australia.  3152
  84.  
  85.    If you register and send $20 (Australian dollars please, our banks charge
  86.    a fortune to convert), I will try and make any changes you
  87.    suggest and I will send you the latest upgrade (with all features
  88.    enabled), the AMOS source and some other AMOS routines and games I am
  89.    working on.
  90.    AMOS programmers can also get a copy of the palette procedure which this
  91.    programme uses. This can be inserted into your own programmes with minimum
  92.    of fuss. Let me know if you want it. FREE to anyone who registers! 
  93.  
  94.    Naturally if you think I have done a really fantastic job on this 
  95.    and you cannot help but show your appreciation by sending more 
  96.    than $20 (Australian Dollars!) etc. then I will happily
  97.    accept it! 
  98.  
  99.    If you have the full version and you have registered: Thanks!
  100.  
  101.    If you have the full version and you have not registered: Then someone
  102.    gave it to you illegally! Please register and do something anatomically
  103.    unpleasant to the pirate who gave (sold?) it to you!
  104.  
  105.      
  106.    WHAT IS IFSGEN?
  107.    ***************
  108.  
  109.    Ifsgen is a programme to generate and display iterated function systems.
  110.    (IFS's). These are a type of fractal which exploit the self-similar
  111.    nature of some shapes to produce a code (the IFS code) which can be used
  112.    to regenerate the image. One advantage of this is that a typical IFS code
  113.    is about 1/500th the size of the original image's code.
  114.  
  115.    An example of a self-similar shape is a fern frond. Each 'branch' of the
  116.    frond is a smaller copy of the entire frond.
  117.  
  118.    What is an IFS code? 
  119.    *********************
  120.    (You can skip this bit if you wish)
  121.    The ifs code is a set of numbers which describes how each part of the
  122.    fern (or any other image) can be derived from the main shape. It does
  123.    this by defining a matrix which describes the mathematical transformation
  124.    for getting from the main image to the smaller image.
  125.    See the Fern example in the programme for this.
  126.  
  127.    In order for the programme to calculate the matrix you must specify 
  128.    3 points on the main image and the corresponding 3 points on each of
  129.    the 'parts' or transformations. When the programme knows the coordinates
  130.    of each of these points it can work out the IFS code.
  131.    I have labelled the main image A and subsequent transformations B,C,D
  132.    etc. The three points on each image are labelled A1,A2,A3. It is 
  133.    important to make sure that the points B1,B2,B3 correspond to these
  134.    same points on the original image.
  135.  
  136.    The IFS code is a set of 6 numbers for each transformation which I
  137.    have labelled A,B,C,D,E and F. These ARE NOT THE SAME as the A,B,C etc
  138.    which I labelled the points with. Sorry if this is a bit confusing
  139.    but you don't need to worry about the actual IFS code to use the
  140.    programme.
  141.      
  142.    To plot the picture the programme picks a point on the screen and then
  143.    chooses one of the transformations at random and applies this to the
  144.    point which is then plotted. The new point is then subjected to the same
  145.    procedure, and this process continues until the user selects stop.
  146.  
  147.    Mathematically 
  148.    
  149.    Xn = A*X + B*Y + E
  150.    Yn = C*X + D+Y + F
  151.    
  152.    Where Xn = new point's X coordinate
  153.          Yn = new point's Y coordinate
  154.           X = last point's X coordinate
  155.           Y = last point's Y coordinate
  156.    A,B,C,D,E and F are the IFS code for the randomly selected transformation.
  157.     
  158.    This method of generating the image is sometimes known as The Chaos Game.
  159.  
  160.    For further information consult any good book on Fractals.
  161.      
  162.    The two that I used were
  163.    "Fractals Everywhere" By Michael Barnsley (Academic Press)
  164.    and     
  165.    "The Science of Fractal Images" Edited by H.O.Peitgen and D.Saupe
  166.    (Springer-Verlag)
  167.  
  168.    INSTRUCTIONS and EXPLANATION OF MENU ITEMS:
  169.    ****************************************** 
  170.  
  171.    GETTING STARTED. (A quick tutorial)
  172.    When you first start IFSGEN you will probably be presented with a
  173.    blank screen (unless I have got around to making a fancy title screen
  174.    or something like that!). 
  175.    I did, so you can ignore the last sentence. Incidentally all of the 
  176.    pictures on this screen were generated with this programme. You should
  177.    find their associated IFS files with this programme.
  178.  
  179.    There are 4 menus which you can use.
  180.  
  181.    You can start a picture in one of 3 ways.
  182.    1. Load IFS from the PROJECT menu.
  183.    2. Add Triangle from the TRANSFORMATION menu
  184.    3. Select one of the 4 examples from the EXAMPLE menu.
  185.     
  186.    First time users will probably find it easiest to select one of the
  187.    examples. Spiral is the simplest one.
  188.    When you have selected this you will see three triangles drawn on the 
  189.    screen. The corners of these triangles are labelled A1,A2,A3 (main
  190.    triangle) and B1,B2,B3 and C1,C2,C3 (The two smaller triangles which
  191.    are used to generate the transformations from the main one). Some of
  192.    these will be difficult to see because they are obscured by some of 
  193.    the others.
  194.    Next select GENERATE from the PICTURE menu.
  195.    The screen will clear and you will slowly see the spiral generated in
  196.    two colours (Green and Blue unless you have already discovered the 
  197.    Palette!). This will take a few minutes to generate.
  198.    Notice that the small green part of the image is really a copy of the
  199.    whole image. (In other words it is self-similar, and the green spiral 
  200.    is known as an affine transformation of the whole image). Similarly,
  201.    the blue section is also a copy of the whole image.
  202.  
  203.    When the image has 'developed' to your satisfaction select stop from
  204.    the PICTURE menu, and then select Show Triangles from the TRANSFORMATION
  205.    menu. This will draw the three triangles on top of your image, so you 
  206.    can see how the picture is constructed from these.
  207.    Now select 'Change Triang B' from the TRANSFORMATION menu and
  208.    you will see triangle B drawn in a different colour and a line leading
  209.    to the mouse. You now have to redraw the triangle using the mouse.
  210.    Place point 1 first. This time put it in the same place as it originally
  211.    was (On the left corner of the big triangle A) by clicking the left mouse
  212.    button over this point. Next place corner B2 (put it over the original 
  213.    B2 this time) and finally place corner B3, put it fairly near the 
  214.    original B3 but not in quite the same spot.
  215.    Now select GENERATE again and see how the shape has changed.
  216.  
  217.    NOTE: The shape is VERY SENSITIVE to small changes in the positions
  218.    of the triangles.
  219.  
  220.    You may also like to look at the other examples.
  221.  
  222.    SIERPINSKI constructs a Sierpinski triangle. This one is fairly easy
  223.    to understand. Each of the three small triangles is a smaller copy of the
  224.    big one and each small one contains three smaller ones and so on.
  225.  
  226.    FERN draws a fern (surprise surprise!)
  227.    This consists of the main triangle and FOUR transformations. The fourth
  228.    (Triangle E) is a bit hard to see. It is a very thin copy of the fern
  229.    and is used to generate the stem. You will see the stem in red when
  230.    you generate it. If you wish to change some of the points on this do it
  231.    carefully. In particular it is very important to keep the small triangles
  232.    in the right place with respect to the others. I.E. if A2 and B2 are
  233.    not in the same place you will get a very strange fern!
  234.    So if you move A2 make sure that you move B2 to the same place!
  235.    The same goes for the following points.
  236.    A1 and E1
  237.    A3 and C2
  238.    B1 and E2
  239.    Also if E3 is not on a straight line between E1 and E2 you will end up 
  240.    with very fat stems!
  241.    (You will not do any harm if you don't follow these rules but you will
  242.    probably end up with something that looks nothing like a fern!)
  243.    SMALL variations to these triangles can produce a variety of ferns and
  244.    trees. To make a tree just move C3 close to the line between C1 and C2, 
  245.    and move D3 close to the line between D1 and D3. You could also try 
  246.    moving A3 and C2  and D3 to the left.
  247.  
  248.    IFS! generates the letters IFS! Each letter is made up of smaller
  249.    copies of IFS! and each small copy is made up of even smaller copies.
  250.    When you get good at manipulating these you might like to try a few 
  251.    words of your own.
  252.  
  253.    Also LOAD some of the IFS files which I have provided and see how these
  254.    are generated.
  255.  
  256.    In particular you could look at some of the galaxy ifs's which are in 
  257.    the drawer. These are all variations of the initial spiral shape with
  258.    a few extra triangles added to make the other 3 spiral arms. Making small
  259.    changes to triangle G will greatly change the spacing of the arms and the
  260.    overall density of the galaxy. You can also change the density of the 
  261.    pictures by stopping the generation earlier or later. 
  262.    Look at the IFF picture 'Galaxies' This was made by combining various 
  263.    galaxy ifs's on the same picture. To do this you should use load iff to
  264.    load a picture, then add your IFS and use Continue (not Generate) when you
  265.    think you have the triangles in the right position. Keep adding other IFS
  266.    codes and use the continue option to draw them on your picture. Finally 
  267.    save the picture with save iff. If you haven't guessed it already, this 
  268.    is how the title screen was generated.
  269.    
  270.    By the way if you want your galaxies to look like galaxies instead of
  271.    multicoloured blobs, then you will have to change the palette to various
  272.    shades of white and grey. If you want to see the colours I used then load
  273.    one of the IFF pictures and then call up the palette tool.
  274.    In this version the IFS file does not save colour information but IFF files 
  275.    do.
  276.  
  277.    If you think you are getting the hang of things try the other menu items
  278.    or find a picture which displays self-similarity and try to generate it!
  279.    (this can be quite hard at first so start with something simple)
  280.    Alternatively just put a few triangles on the screen and see what happens!
  281.  
  282.  
  283.    EXPLANATION OF MENU ITEMS
  284.    *************************
  285.  
  286.    PROJECT MENU:
  287.       ABOUT: Try it and see!
  288.       NEW: clears everything!
  289.       LOAD IFS and SAVE IFS: Load and save the IFS code for the images but
  290.       not the actual pictures. (Use LOAD IFF and SAVE IFF in the PICTURE
  291.       menu for this.) SAVE IS DISABLED IN THE DEM VERSION
  292.       INSTRUCTIONS: Try it!
  293.       QUIT: Do I really need to say it?
  294.  
  295.    TRANSFORMATION MENU:
  296.    This allows you to define and manipulate the various transformations 
  297.    (triangles) which make up the image. You will need to select Generate
  298.    to see the effect of any changes on your image.
  299.  
  300.       ADD TRIANG: This adds another triangle to the image. You should also 
  301.       use this to start an image definition from scratch.
  302.       Clicking this will result in a line being drawn from the current 
  303.       mouse position to somewhere else on the screen (it doesn't matter
  304.       where the other end is, as it is the position of the mouse which 
  305.       is important). If this is the first triangle (Triangle A) then
  306.       the first point wil be A1. Move the mouse to the position you want
  307.       A1 and click the left mouse button. Next place A2 and A3.
  308.  
  309.       You should then add at least 2 more triangles. You cannot GENERATE
  310.       an image until you have at least 3 triangles (including A) defined.
  311.  
  312.       If you make any of the others larger than A the image will probably be
  313.       much larger than the screen.
  314.       (This isn't a fatal problem but you should remember that triangle A is
  315.       used to define the position of the whole shape, while the others are
  316.       used to define the position of SMALLER parts of the shape, so if you
  317.       are trying to produce something in particular keep this in mind. If
  318.       not then feel free to experiment!)
  319.        
  320.       You can have a maximum of 26 triangles because I ran out of letters
  321.       in the alphabet, maybe next time I should programme in Chinese? Apart
  322.       from this there is no reason why this could not be increased.
  323.  
  324.  
  325.       CHANGE TRIANGLE: allows you to reposition a triangle. Unfortunately
  326.       you must place all three corners, although the original position is
  327.       displayed until you have finished so that you can see where it was!
  328.       Maybe in version 2 I will fix this so that you can just reposition
  329.       one corner? (If you want this then write and let me know!)
  330.         
  331.       DELETE TRIANGLE: Fairly obvious!
  332.       But there are two things which you should be aware of.
  333.       1. All other triangles will be relabelled so that you still
  334.          have a complete alphabetical sequence. I.E. if you delete B
  335.          then C will become B, D will become C etc.
  336.       2. You cannot delete triangle A. All others use this as a reference.
  337.          If this did not exist the programme could not calculate the IFS
  338.          code.
  339.  
  340.       Sorry, 3 things!
  341.  
  342.       3. At this stage there is no check to ask if you are sure. Maybe 
  343.          Version 2?
  344.  
  345.       MOVE: this is to allow you to resize and reposition the image on 
  346.             the screen. This is done by manipulating the IFS code, not the
  347.             image, so you will have to Generate again after selecting this.
  348.  
  349.         ZOOM IN: allows you to define a rectangular box with the mouse
  350.                  Click left mouse button on where you want the top left
  351.                  corner of the box and drag it to the place you want the 
  352.                  bottom right corner. Let go and the area inside the box 
  353.                  will be enlarged to fill the screen.
  354.        ZOOM OUT: works in a similar way to zoom in but this time the
  355.                  area displayed on the screen will be shrunk to fit inside
  356.                  the box. This will allow you to see any areas of image
  357.                  which have gone off the screen.
  358.               
  359.            NOTE: The zoom functions were intended to allow fairly small
  360.                  resizing of the image. Excessive use of these will result
  361.                  in large rounding off errors. You should be able to ZOOM 
  362.                  IN by a factor of about 1000 and ZOOM OUT by a factor of
  363.                  about 1,000,000 without any trouble. If you go too far your
  364.                  picture will not be very accurate but the programme should
  365.                  still run.
  366.  
  367.          CENTRE: This allows you to recentre the picture. Place the 
  368.                  crosshair where you want the new centre to be. The 
  369.                  triangles will be moved so that this point will now
  370.                  be at the centre of the screen
  371.  
  372.   ROT 90, 180, 270: Rotate the image 90, 180 and 270 degrees
  373.                     respectively in an anticlockwise direction.
  374.  
  375.          FLIP X:  Flips the picture from left to right.
  376.          FLIP Y:  Flips the picture from top to bottom.
  377.  
  378.        FINE TUNE: Allows you to display and change the position and/or
  379.                   the IFS code of any point or triangle respectively.
  380.                   (see "What is an IFS code?" above.) This brings up a
  381.                   window with the letters A to Z at the top. These are
  382.                   for the triangles which you have defined. Any triangle
  383.                   which has not been defined SHOULD be displayed in a 
  384.                   different colour and cannot be selected. Select the 
  385.                   triangle you wish to fine tune (or just view) by clicking
  386.                   on its letter with the mouse. This will display the
  387.                   coordinates of the corner points of your triangle
  388.                   together with the associated IFS code. Click the mouse 
  389.                   on any box you wish to change and retype it. Press return
  390.                   when done. (There are a couple of 'slightly undesirable
  391.                   features' in this which might appear from time to time,
  392.                   just make sure that the number in the box is right before
  393.                   you quit. These will take any number between 1E-14 and 
  394.                   1E+15 (I hope!), but be aware that if you position one of
  395.                   your points at a screen coordinate of 1E+15 you will find
  396.                   that the programme takes a very long time to draw the
  397.                   triangles!
  398.                   To change another triangle just click on the letter.
  399.                   When you have done select quit.
  400.            NOTES: You cannot change the IFS code for triangle A (this will
  401.                   always be displayed as zero).
  402.                   There is no way of getting your original settings back
  403.                   after you have pressed return, unless you have written
  404.                   them down somewhere or you have used the SAVE IFS option
  405.                   in the PROJECT menu. Something else for Vers. 2?
  406.  
  407.  HIDE/SHOW triangles: Fairly self explanatory!
  408.  
  409.  PICTURE MENU:
  410.       GENERATE: This clears the screen and starts the picture generating.
  411.                 This will also disable the TRANSFORMATION and EXAMPLE
  412.                 menus together with the New, load ifs and save ifs from
  413.                 the project menu. You cannot generate until you have
  414.                 defined at least three triangles.
  415.           STOP: Stops the picture from generating and allows you to use 
  416.                 all of the other menus.
  417.       CONTINUE: This does exactly the same as Generate except that the
  418.                 screen is not cleared first. This can be used to either
  419.                 continue generating a picture after it has been stopped
  420.                 or for generating an image on top of another image or
  421.                 an iff screen which you have loaded.
  422.        PALETTE: This brings up a palette requester which I wrote called
  423.                 Gumbypal. This is an AMOS procedure which you can inlcude
  424.                 in your own AMOS programmes.
  425.     This procedure currently  supports the following features.
  426.  
  427.      DRAGBAR:
  428.      This is the message (Gumby's Palette) at the top of the screen. 
  429.      Hold left mouse button down while you are over this and drag the
  430.      palette screen up and down your screen.
  431.  
  432.      ABOUT:
  433.      Work this out for yourself!
  434.  
  435.      RGB sliders: These work in the usual way, just click on the slider
  436.      with the left mouse button and drag it along, or just click on the
  437.      spot you want it to go to.
  438.  
  439.      Up to 32 colours are displayed in little boxes on the right of the    
  440.      screen. You can select two of these at any time. 
  441.  
  442.      Left mouse button selects the CURRENT colour. This will be changed
  443.      by moving the slider bars.
  444.  
  445.      Right mouse button selects the TO colour. This is used by COPY,
  446.      SPREAD and CYCLE, to copy, spread or cycle from the current colour    
  447.      to the TO colour, and also by SWAP to swap the current colour with   
  448.      the TO colour.
  449.  
  450.      The TO and CURRENT colours are outlined in different colours so that
  451.      you can see them. It is possible that the colours used by these 
  452.      outlines are hard to see because they are the same or similar
  453.      to the colour of the background around the colour boxes. 
  454.  
  455.      COLOUR Buttons:
  456.      There are 6 of these, GET, COPY, SWAP, CYCLE, SPREAD and SKIP.
  457.      These are selected with the left (and sometimes right) mouse button.
  458.  
  459.      COPY and SWAP are explained above.
  460.  
  461.      CYCLE. Press Left mouse button to cycle forward and right mouse 
  462.      button to cycle backwards.
  463.  
  464.      SPREAD spreads the colour from the current colour to the TO colour
  465.      and works in conjunction with the SKIP button. 
  466.  
  467.      If SKIP is 1 then the spread will skip 1 colour in between each      
  468.      one it spreads. Best way is to try it! I put this in because I 
  469.      thought it might be useful in a Mandelbrot type programme.
  470.      SKIP can be any number you like providing it is between 0 and 9.
  471.      I don't think it would be a very good idea to set it to a number   
  472.      greater than the number of colours between the two colours you are
  473.      spreading between. This could cause some unpredictable results.
  474.      Usually you will leave this set to zero.
  475.    
  476.      GET brings up a window with a number of preset colours.
  477.      You can pick any colour to be changed into one of the preset 
  478.      colours. Pick your CURRENT GET colour by clicking it with the
  479.      Left mouse button. This will not disturb your CURRENT and TO
  480.      settings although the outlines on these boxes may disappear
  481.      while the get window is open. (They will return when you close
  482.      this window.)
  483.      When you open this window the CURRENT GET colour will be set to 
  484.      colour number 2 (third from the left on the top row). If you don't
  485.      want to change this colour then select a different one.     
  486.  
  487.      The up and down arrows on the left move the list of colours up 
  488.      and down.
  489.      
  490.      P picks the colour in the middle of the box and changes your CURRENT
  491.      GET colour to this. 
  492.      
  493.      R assigns a random colour to your CURRENT GET colour.
  494.  
  495.      Cancel CURRENT returns your CURRENT GET colour to what it was
  496.      before you opened the GET window.
  497.      Cancel ALL returns all of the colours to what they were before
  498.      you opened the GET window. 
  499.  
  500.      QUIT quits the GET window.
  501.  
  502.  
  503.      SPRITE performs a Get Sprite Palette when you click it.
  504.  
  505.      DEFAULT Left mouse 
  506.      returns all colours to the programme's default colours
  507.     
  508.      DEFAULT Right mouse
  509.      selects the AMOS default palette.
  510.  
  511.      Exit CANCEL cancels all changes and returns you to your programme.
  512.      Exit ACCEPT keeps all changes and returns you to your programme.
  513.  
  514.                END OF PALETTE DOCS.
  515.       
  516. SAVE IFF and LOAD IFF: save and load an IFF screen.
  517.                 THIS DOES NOT SAVE OR LOAD THE IFS CODE NEEDED TO 
  518.                 GENERATE THE TRIANGLES! (Use load and save IFS in the
  519.                 project menu for this.)
  520.                 SAVE IS DISABLED IN THE DEM VERSION
  521.  
  522.  MONO/MULTI COLOUR. Allows image generation in a single colour
  523.                 (which is faster) or plots each transformation in a 
  524.                 different colour (which can be useful if you want to see
  525.                 what each triangle is doing)
  526.  
  527.     EXAMPLE MENU: contains 4 examples. Select them and then GENERATE.
  528.                   See the tutorial 'getting started' above.
  529.  
  530.   WARNING!
  531.   Many functions are irreversible. (eg. NEW, DELETE etc.) There are  no 
  532.   'idiot proof' boxes asking you 'are you sure' in this version.
  533.   (Something  else for V2!)
  534.  
  535.  
  536.   BUGS
  537.   ****
  538.   This code has been thoroughly tested by an expert bug finder 
  539.   (Perry Rosenboom) who has the incredible ability to run a programme
  540.   for the first time and find bugs that happen once in a blue moon!
  541.   (I never did manage to reproduce the one which turned the screen 
  542.   white, although I have made sure? that it can't happen again!)
  543.  
  544.   My code no longer contains any bugs. It may contain a few Slightly 
  545.   Undesirable Features (SUFs). If you find any SUFs in it please write
  546.   back and let me know.
  547.  
  548.  
  549.   It is possible that you will produce a set of triangles for which it is
  550.   impossible to solve the set of simultaneous equations which are used to
  551.   find the IFS code. This is NOT a bug! (you are trying to do something
  552.   which is mathematically impossible!)
  553.   This would result in a divide by zero error.
  554.   I have put in a routine to trap this, but if you come up with any 
  555.   other divide by zero errors please send details.
  556.  
  557.   If you try to generate an 'impossible' ifs code (this will usually
  558.   only happen if you put all three corners of one triangle in the same
  559.   spot, or if you zoom in too far, thereby making a triangle of zero size)
  560.   then a message will appear on the screen asking you to redefine your
  561.   triangles. Press the space bar to continue. 
  562.   Unfortunately due to a minor SUF, sometimes the message will flash up
  563.   once for each triangle and you will have to keep pressing the space bar
  564.   until it goes away. It will go eventually!
  565.   When this message screen is displayed it may cause you to run out of 
  566.   memory and the programme will stop. (see 'memory requirements' above.)
  567.   So if the programme stops when you have just placed a triangle it is
  568.   almost certainly due to lack of memory. I'm working on it!
  569.  
  570.   AMOS PROGRAMMERS NOTES
  571.   **********************
  572.  
  573.   If you have registered and have the source!
  574.  
  575.   If you are trying to figure out what I have done, good luck! I had to 
  576.   restructure a large part of it and the result is a hybrid between two
  577.   control systems. I might fix it up one day, but at the moment it works
  578.   so I'm happy!
  579.   You will also notice that I'm not very good at putting in the REMs!
  580.  
  581.   There are 3 general procedures which you may find useful
  582.  
  583.   1. GUMBYPAL:
  584.          My palette procedure. Full details of this can be found in
  585.          gumbypal.doc. This has been modified slightly by the addition
  586.          of a few lines at the end to handle the dummy screen which is
  587.          used by ifsgen to assist in hiding/showing the triangles.
  588.   2. GPBUTTONS:
  589.              A procedure for drawing fancy buttons around a zone of text.
  590.              See gumbypal.doc for details.
  591.   3. SIMEQNS:
  592.            A simultaneous equation solver. This should be fairly self 
  593.            explanatory. The coefficients of the variables are fed into 
  594.            an array, SIMA# and the answers are returned in the array SIMX#
  595.            These must be made global. (If only Francois had allowed us to
  596.            pass an array as a parameter!)
  597.  
  598.   Sorry, 4 things. Amongst the procedures which you may find useful are.....
  599.  
  600.   4. STRINGGET:
  601.              This is used in the fine tune window to display and change
  602.              various strings. This has been modified a few times and is
  603.              realy due for a complete rewrite to make it a bit more logical
  604.              and capable of selecting numbers and/or letters. If anyone 
  605.              gets around to doing this before I do please send it back!
  606.              The last parameter is used to allow or disallow changes to
  607.              the displayed string.
  608.  
  609.   The above 4 routines were written in a way which made them as general as
  610.   I could possibly make them so that they could easily be used in other
  611.   programmes. 
  612.  
  613.  
  614.   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  615.       
  616.       I hope you find this programme useful and/or interesting and that you 
  617.       bother to take the time to write back. If you have written anything 
  618.       that you would like to send me, please feel free to do so.
  619.  
  620.  
  621.       BUT PLEASE DON'T SEND ANY SILLY SCROLLY DEMOS, MEGADEMOS, ULTRADEMOS,
  622.       ULTRAMEGADEMOS, MEGAULTRADEMOS, ULTRACOSMICDEMOS, ALPHAGAMMAOMEGADEMOS,
  623.       ZAPHODEFFINGBEEBLEBROXDEMOS OR ANYTHING ELSE VAGUELY RESEMBLING A DEMO!
  624.  
  625.  
  626.       AMOS IS A BRILLIANT LANGUAGE SO HOW ABOUT USING IT TO WRITE SOMETHING
  627.       REALLY USEFUL?
  628.  
  629.       Happy (real) programming.
  630.       Andrew.
  631.  
  632.  
  633.  
  634.  
  635.  
  636. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  637.  
  638.  
  639.       V2.0 docs 
  640.       *********
  641.  
  642.       Rewrote some of the code to make procedure calls more consistent and
  643.       to  remove a problem which sometimes caused a recursive procedure call
  644.       which eventually resulted in an out of memory error. (I admit that 
  645.       this just about rates as a bug! Shock!! Horror!!! Shutup Perry!)
  646.  
  647.       Added a close editor line to conserve memory when running from AMOS
  648.  
  649.       Repositioned the mouse pointer so that it didn't cover up the centre 
  650.       of the cross hairs when you are defining your triangles.
  651.     
  652.       Removed the limits to the position of the mouse so that you can put it
  653.       anywhere on your screen. NTSC users probably didn't find this a
  654.       problem but PAL users would have had trouble using the bottom of the
  655.       screen until after they had selected zoom.
  656.  
  657.       Colour palette is now saved with the ifs codes. You have the option 
  658.       of loading this or ignoring it when you load an ifs file.
  659.       V1.0 ifs files are compatible with v2.0  but v2.0 files will not load
  660.       into v1.0! So get rid of v1.0 now!
  661.     
  662.       Added idiot boxes for some functions
  663.  
  664.       Added ability to adjust single corners of triangles when using CHANGE.
  665.       To use CHANGE now, just select the triangle you want to change from 
  666.       menu, then click left mouse button near the corner you want to change.
  667.       Change other corners the same way. When you have finished just click
  668.       left mouse button somewhere not very near to one of the corners.
  669.       I have deliberately left the original triangle visible until you have
  670.       finished your adjustments. I found it more useful this way.
  671.  
  672.       Trapped errors. These are reported by their AMOS error numbers.
  673.       Out of memory and divide by zero will also generate a message.
  674.       If you have problems, please describe what you were doing and 
  675.       quote the error number.
  676.  
  677.  
  678.       NEW MENU ITEMS    
  679.       ##############
  680.  
  681.       CLOSE WORKBENCH. (in PROJECT menu)
  682.       **********************************
  683.       This saves about 40k of memory.
  684.  
  685.       PROBABILITY. (in TRANSFORMATION menu)
  686.       *************************************
  687.       You cannot use this until you have at least 3 triangles defined
  688.       (including A).      
  689.       This allows users to adjust the probability of any particular 
  690.       transformation being plotted. The higher the probability the more
  691.       likely this particular triangle will be chosen when each point is 
  692.       plotted.
  693.       To change these just click on the relevant box and retype the
  694.       correct value (just the same as the way the FINETUNE boxes work).
  695.       If you don't adjust this then the probability is proportional to the 
  696.       area of the triangle. 
  697.       
  698.       AREAS BUTTON
  699.       This returns the probabilities to their default condition which is 
  700.       proportional to the area of the triangle.
  701.  
  702.       NORMALISE BUTTON
  703.       All probabilities should add up to 1. I have provided a NORMALISE 
  704.       button which will recalculate all of your probabilities so that the 
  705.       total is 1. This is so you can enter relative weights without worrying
  706.       about the total. Eg. if you have two transformations (triangles B and
  707.       C) and you want B to be twice as likely as C then enter 2 in the space 
  708.       for B and 1 in the space for C. Then click NORMALISE and the 
  709.       programme will recalculate the probabilities giving B = 0.6667 and
  710.       C = 0.3333.
  711.       You cannot adjust the probability of triangle A because this is not
  712.       actually plotted!
  713.  
  714.       Click on QUIT when finished. The programme will automatically 
  715.       readjust the probabilities so that they add up to one if you haven't
  716.       already done so (see NORMALISE BUTTON above).
  717.  
  718.       ROTATE ANY. (in TRANSFORMATION:- MOVE menu)
  719.       *******************************************
  720.       Allows you to rotate at any angle or fraction of an angle.
  721.       Just type in the angle (in degrees) that you wish to rotate at
  722.       and press return.
  723.       Positive angles rotate clockwise, negative angles rotate anticlockwise.
  724.       (Any mathematicians who winced at the last sentence should stop and 
  725.       think! It is the crazy backwards coordinate system of this computer 
  726.       - fancy making positive y values go down! - that results in this 
  727.       apparent heresy. Stick the y axis back the right way and all is fine!) 
  728.  
  729.  
  730.       MONO/MULTI colour
  731.       *****************
  732.       You now have a choice of colour when using MONO. This might make it 
  733.       easier to combine 2 or more IFF files into the same picture.
  734.       You also have a choice of starting colours with MULTI. In each case
  735.       you will be presented with a number of colour boxes after you
  736.       select the menu item. Just click on the one you want.
  737.  
  738.     
  739.       CENTRE
  740.       ******
  741.       Made the centre tool a bit easier to use. Just drag the triangles
  742.       to wherever you want them. Sorry about the flicker but it would
  743.       use up too much memory to stop it.
  744.      
  745.  
  746.       VERSION 2.1
  747.       ***********
  748.           Compiled version. At last!
  749.           This allows non-Amos users to run it without messing about
  750.           with Ramos, and it also increases the speed of the programme.
  751.  
  752.   
  753.       Version 2.2
  754.       ***********
  755.       Tidied up a few bits of code and hopefully stopped the mouse from
  756.       disappearing. This happened rarely and may be due to an incompatability
  757.       with Dmouse (or similar)
  758.                 
  759.       Version 2.3
  760.       ***********
  761.       Registered versions will now have the name of the person who registered
  762.       in the about screen. Tidied up a few more bits of code. Now uses a bit
  763.       less chip ram.
  764.  
  765.      
  766.       Version 2.4
  767.       ***********
  768.       Compiled with amos 1.35 so it should run on A1200s.
  769.